import {requestHttp} from './request'
import qs from 'qs';

// const base_url = import.meta.env.VITE_BASE_URL
const base_url = ''

export const GetGoodsRecommendList = (data: any)=>{
    return requestHttp('get',`${base_url}/api/goods/recommend/list?${qs.stringify(data)}`)
}

export const GetCategorieList = (data: any)=>{
    return requestHttp('get',`${base_url}/api/categorie/list?${qs.stringify(data)}`)
}

export const GetStoreList = (data: any)=>{
    return requestHttp('get',`${base_url}/api/store/list?${qs.stringify(data)}`)
}

export const GetAddressList = (data: any)=>{
    return requestHttp('get',`${base_url}/api/address/list?${qs.stringify(data)}`)
}

export const PostOrderConfirm = (data: any)=>{
    return requestHttp('post',`${base_url}/api/order/confirm`, data)
}

export const GetGoodsInfo = (data: any)=>{
    return requestHttp('get',`${base_url}/api/goods/info?${qs.stringify(data)}`)
}

export const GetPayment = (data: any)=>{
    return requestHttp('get',`${base_url}/api/payment/list?${qs.stringify(data)}`)
}
